import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import mglearn

def createDataSet1():    # 创造示例数据
    pd.set_option("display.max_columns", 1000000)
    pd.set_option('display.width', 10000)
    dataset = pd.read_csv('sonar.csv')
    dataset.replace('R',0,inplace=True)
    dataset.replace('M',1,inplace=True)
    dataset=np.array(dataset)
    print(dataset)
    return dataset
dataset=createDataSet1()